<?php 
require("./includes/init.php");
function doindex(){
	global $mysql,$id,$urlstr;
	if(!empty($id)){
		$sql="select type from customer where id = $id ";
		$res=$mysql->one($sql);
		if(!empty($res)){
			if($res['type']==0){//shop
				header("Location: ./shop/$urlstr");
				exit;
			}elseif($res['type']==1){//edu
				header("Location: ./edu/$urlstr");
				exit;
			}elseif($res['type']==4){//chain
				header("Location: ./chain/$urlstr");
				exit;
			}
		}
	}
}
?>